Skip to content

TokenSource API examples#18

Open
alan-george-lk wants to merge 11 commits into
mainfrom
feature/token_source_examples
Open

TokenSource API examples#18
alan-george-lk wants to merge 11 commits into
mainfrom
feature/token_source_examples

Conversation

@alan-george-lk

@alan-george-lk alan-george-lk commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds five small token-source examples for LiveKit C++ SDK v1.3.0+, each as its own executable under token_source/
  • Some small documentation formatting/updates

Examples

  • token_source_literal — connect with a URL + JWT you already have (LiteralTokenSource)
  • token_source_endpoint — fetch credentials from your backend token endpoint (EndpointTokenSource)
  • token_source_sandbox — use LiveKit Cloud’s sandbox token server for local dev (SandboxTokenSource)
  • token_source_custom — plug in your own async credential provider (CustomTokenSource)
  • token_source_caching — wrap another source with JWT-aware caching (CachingTokenSource)

alan-george-lk and others added 9 commits May 28, 2026 20:58
Add one example per token source type (literal, endpoint, sandbox,
custom, caching) that connects to a room, plus a shared common.h for the
logging delegate and connect/observe session loop. The sandbox example
reads its sandbox ID from the environment so no IDs are committed.

These build against a local install of the SDK's token source API branch
via -DLIVEKIT_LOCAL_SDK_DIR; see token_source/README.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename the per-type token source examples and shared helper to a
token_source_ prefix so source filenames match their executable target
names, and update the CMake source list, includes, and README references.

Pin the README build instructions to client-sdk-cpp commit bbf6a41 and
update the caching example comment to reference invalidate() now that
force_refresh was dropped from the SDK API.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@alan-george-lk alan-george-lk marked this pull request as ready for review July 1, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant